from fastapi import FastAPI
import uvicorn

from app.search import doc_search
from app.query import question_query
from app.query import query_rewrite
from app.query import random_question

app = FastAPI()

app.include_router(doc_search.router)
app.include_router(question_query.router)
app.include_router(query_rewrite.router)
app.include_router(random_question.router)

@app.get("/")
async def root():
    return {"message": "Hello Ancient Book Retrieval!"}


if __name__ == '__main__':
    uvicorn.run(app, host='0.0.0.0', port=8001, workers=1, loop="asyncio")
